Skip to content

Conversation

@MritunjayTiwari14
Copy link

Before After (Screenshot)
column_l listview_l
column_d listview_d

Video Recordings

Before

before.mp4

After (Normal)

after.mp4

After (Increased Text Size to unreasonably high in android settings to test edge case)

after_increased_text_size_too_much_in_android_settings_edge_case.mp4

Fixes #1904

@gnprice
Copy link
Member

gnprice commented Oct 11, 2025

Thanks for taking care of this!

Before we can review this change, it will need a test.

Those screenshots and recordings are very helpful, thanks. One remark: there's nothing unreasonable about the large text size — people vary in how sharp their vision is, and for some people that setting is useful by making it possible to read the text on the screen.

@MritunjayTiwari14
Copy link
Author

Thank you @gnprice for reminding about the test. I have added the test for scrolling in the latest commit.

I have limited the screen size to 200x200px to test the scrolling effect as lower down to 100x100px caused some rendering issue while running the test.

@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Oct 15, 2025
@chrisbobbe chrisbobbe self-assigned this Oct 23, 2025
Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Comments below.

For the commit message:

settings: Add scroll for settings page

This commit replaced Column with
ListView Widget to enable scrolling effect.
  • It needs a Fixes #<issue number>. line, like other commits that fix issues in the tracker.
  • The sentence in the body isn't needed; it just restates what's already obvious from reading the diff.
  • For the summary line, "add scroll" sounds a little odd to me; how about settings: Make page scrollable.

}, variant: TargetPlatformVariant({TargetPlatform.android, TargetPlatform.iOS}));
});

group('SettingPageScrollBehavior', () {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This string looks like an identifier, like the name of a class or something, but then I don't find anything when I look for its definition. To be less confusing, we should just say "SettingsPage scroll behavior" or similar. (SettingsPage is the name of a class, so it doesn't add confusion to use that name.)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also nit: the test groups are now in this order:

  1. 'ThemeSetting'
  2. 'BrowserPreference'
  3. (this group)
  4. 'VisitFirstUnreadSetting'
  5. 'MarkReadOnScrollSetting'

To be more organized, let's put the new group before the groups that are about individual settings, instead of in the middle of them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Moving it to the top seems reasonable here.

final lastElementFinder = GlobalSettingsStore.experimentalFeatureFlags.isNotEmpty
? find.text("Experimental features")
: find.text("Mark messages as read on scroll");
check(lastElementFinder.evaluate().isEmpty).equals(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: how about check(lastElementFinder).findsNothing();

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Good thought to test that the row isn't visible before scrolling. We want to be sure that the scrolling is actually what causes the row to become visible, rather than some other factor, which could arise in the future, like the settings being presented in a different order than when we wrote this test.)


await tester.scrollUntilVisible(lastElementFinder, 100,
scrollable: find.byType(Scrollable));
check(lastElementFinder.evaluate().isEmpty).equals(false);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: how about `check(lastElementFinder).findsOne();

Copy link
Author

@MritunjayTiwari14 MritunjayTiwari14 Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems more high level.

Comment on lines 170 to 172
final lastElementFinder = GlobalSettingsStore.experimentalFeatureFlags.isNotEmpty
? find.text("Experimental features")
: find.text("Mark messages as read on scroll");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
final lastElementFinder = GlobalSettingsStore.experimentalFeatureFlags.isNotEmpty
? find.text("Experimental features")
: find.text("Mark messages as read on scroll");
final lastElementFinder = GlobalSettingsStore.experimentalFeatureFlags.isNotEmpty
? find.text("Experimental features")
: find.text("Mark messages as read on scroll");

});

group('SettingPageScrollBehavior', () {
testWidgets('scroll settings list when screen size is small', (tester) async {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
testWidgets('scroll settings list when screen size is small', (tester) async {
testWidgets('content is scrollable when taller than a screenful', (tester) async {

(Helps focus the reader on what the test's purpose is, and acknowledges that the test can still be helpful when the screen is normal-sized, in a future where the list of settings is much longer.)

@MritunjayTiwari14
Copy link
Author

Thank you @chrisbobbe for taking time to review, all the requested changes and some other nits have been pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer review PR ready for review by Zulip maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings page should scroll

3 participants